home *** CD-ROM | disk | FTP | other *** search
- <refentry id="libgimp-gimpfileops" revision="19 Jan 2001">
- <refmeta>
- <refentrytitle>gimpfileops</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>LIBGIMP Library</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>gimpfileops</refname><refpurpose></refpurpose>
- </refnamediv>
-
- <refsynopsisdiv><title>Synopsis</title>
- <synopsis>
-
-
-
- <link linkend="gchar">gchar</link>* <link linkend="gimp-temp-name">gimp_temp_name</link> (<link linkend="gchar">gchar</link> *extension);
- <link linkend="gint32">gint32</link> <link linkend="gimp-file-load">gimp_file_load</link> (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
- <link linkend="gchar">gchar</link> *filename,
- <link linkend="gchar">gchar</link> *raw_filename);
- <link linkend="gboolean">gboolean</link> <link linkend="gimp-file-save">gimp_file_save</link> (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
- <link linkend="gint32">gint32</link> image_ID,
- <link linkend="gint32">gint32</link> drawable_ID,
- <link linkend="gchar">gchar</link> *filename,
- <link linkend="gchar">gchar</link> *raw_filename);
- <link linkend="gboolean">gboolean</link> <link linkend="gimp-register-magic-load-handler">gimp_register_magic_load_handler</link>
- (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes,
- <link linkend="gchar">gchar</link> *magics);
- <link linkend="gboolean">gboolean</link> <link linkend="gimp-register-load-handler">gimp_register_load_handler</link> (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes);
- <link linkend="gboolean">gboolean</link> <link linkend="gimp-register-save-handler">gimp_register_save_handler</link> (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes);
- </synopsis>
- </refsynopsisdiv>
-
-
-
-
-
- <refsect1>
- <title>Description</title>
- <para>
-
- </para>
- </refsect1>
-
- <refsect1>
- <title>Details</title>
- <refsect2>
- <title><anchor id="gimp-temp-name">gimp_temp_name ()</title>
- <programlisting><link linkend="gchar">gchar</link>* gimp_temp_name (<link linkend="gchar">gchar</link> *extension);</programlisting>
- <para>
- Generates a unique filename.
- </para>
- <para>
- Generates a unique filename using the temp path supplied in the
- user's gimprc.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>extension</parameter> :</entry>
- <entry> The extension the file will have.
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The new temp filename.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-file-load">gimp_file_load ()</title>
- <programlisting><link linkend="gint32">gint32</link> gimp_file_load (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
- <link linkend="gchar">gchar</link> *filename,
- <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
- <para>
- Loads a file by extension.
- </para>
- <para>
- This procedure invokes the correct file load handler according to
- the file's extension and/or prefix. The name of the file to load is
- typically a full pathname, and the name entered is what the user
- actually typed before prepending a directory path. The reason for
- this is that if the user types http://www.xcf/~gimp/ he wants to
- fetch a URL, and the full pathname will not look like a URL.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>run_mode</parameter> :</entry>
- <entry> The run mode.
- </entry></row>
- <row><entry align="right"><parameter>filename</parameter> :</entry>
- <entry> The name of the file to load.
- </entry></row>
- <row><entry align="right"><parameter>raw_filename</parameter> :</entry>
- <entry> The name entered.
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The output image.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-file-save">gimp_file_save ()</title>
- <programlisting><link linkend="gboolean">gboolean</link> gimp_file_save (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
- <link linkend="gint32">gint32</link> image_ID,
- <link linkend="gint32">gint32</link> drawable_ID,
- <link linkend="gchar">gchar</link> *filename,
- <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
- <para>
- Saves a file by extension.
- </para>
- <para>
- This procedure invokes the correct file save handler according to
- the file's extension and/or prefix. The name of the file to save is
- typically a full pathname, and the name entered is what the user
- actually typed before prepending a directory path. The reason for
- this is that if the user types http://www.xcf/~gimp/ she wants to
- fetch a URL, and the full pathname will not look like a URL.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>run_mode</parameter> :</entry>
- <entry> The run mode.
- </entry></row>
- <row><entry align="right"><parameter>image_ID</parameter> :</entry>
- <entry> Input image.
- </entry></row>
- <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
- <entry> Drawable to save.
- </entry></row>
- <row><entry align="right"><parameter>filename</parameter> :</entry>
- <entry> The name of the file to save the image in.
- </entry></row>
- <row><entry align="right"><parameter>raw_filename</parameter> :</entry>
- <entry> The name of the file to save the image in.
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-register-magic-load-handler">gimp_register_magic_load_handler ()</title>
- <programlisting><link linkend="gboolean">gboolean</link> gimp_register_magic_load_handler
- (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes,
- <link linkend="gchar">gchar</link> *magics);</programlisting>
- <para>
- Registers a file load handler procedure.
- </para>
- <para>
- Registers a procedural database procedure to be called to load files
- of a particular file format using magic file information.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
- <entry> The name of the procedure to be used for loading.
- </entry></row>
- <row><entry align="right"><parameter>extensions</parameter> :</entry>
- <entry> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
- </entry></row>
- <row><entry align="right"><parameter>prefixes</parameter> :</entry>
- <entry> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
- </entry></row>
- <row><entry align="right"><parameter>magics</parameter> :</entry>
- <entry> comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\").
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-register-load-handler">gimp_register_load_handler ()</title>
- <programlisting><link linkend="gboolean">gboolean</link> gimp_register_load_handler (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes);</programlisting>
- <para>
- Registers a file load handler procedure.
- </para>
- <para>
- Registers a procedural database procedure to be called to load files
- of a particular file format.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
- <entry> The name of the procedure to be used for loading.
- </entry></row>
- <row><entry align="right"><parameter>extensions</parameter> :</entry>
- <entry> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
- </entry></row>
- <row><entry align="right"><parameter>prefixes</parameter> :</entry>
- <entry> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
- <refsect2>
- <title><anchor id="gimp-register-save-handler">gimp_register_save_handler ()</title>
- <programlisting><link linkend="gboolean">gboolean</link> gimp_register_save_handler (<link linkend="gchar">gchar</link> *procedure_name,
- <link linkend="gchar">gchar</link> *extensions,
- <link linkend="gchar">gchar</link> *prefixes);</programlisting>
- <para>
- Registers a file save handler procedure.
- </para>
- <para>
- Registers a procedural database procedure to be called to save files
- in a particular file format.</para>
- <para>
-
- </para><informaltable pgwide=1 frame="none" role="params">
- <tgroup cols="2">
- <colspec colwidth="2*">
- <colspec colwidth="8*">
- <tbody>
- <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
- <entry> The name of the procedure to be used for saving.
- </entry></row>
- <row><entry align="right"><parameter>extensions</parameter> :</entry>
- <entry> comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\").
- </entry></row>
- <row><entry align="right"><parameter>prefixes</parameter> :</entry>
- <entry> comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\").
- </entry></row>
- <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
- </entry></row>
- </tbody></tgroup></informaltable></refsect2>
-
- </refsect1>
-
-
-
-
- </refentry>
-